<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
<meta charset="UTF-8" />
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php if($this->config->get('moderns_theme_skin')== 1) { ?><link rel="stylesheet" type="text/css" href="catalog/view/theme/moderns/stylesheet/stylesheet.css" /><?php } ?>
<?php if($this->config->get('moderns_theme_skin')== 0) { ?><link rel="stylesheet" type="text/css" href="catalog/view/theme/moderns/stylesheet/stylesheet-white.css" /><?php } ?>
<?php if ($direction == 'rtl') { ?>
<?php if($this->config->get('moderns_theme_skin')== 1) { ?><link rel="stylesheet" type="text/css" href="catalog/view/theme/moderns/stylesheet/stylesheet-rtl.css" /><?php } ?>
<?php if($this->config->get('moderns_theme_skin')== 0) { ?><link rel="stylesheet" type="text/css" href="catalog/view/theme/moderns/stylesheet/stylesheet-white-rtl.css" /><?php } ?>
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/moderns/stylesheet/flexslider.css" />
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="catalog/view/theme/moderns/js/custom.js"></script>
<script type="text/javascript" src="catalog/view/theme/moderns/js/jquery.easing.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>
<script src="catalog/view/theme/moderns/js/jquery.flexslider.js" type="text/javascript"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<?php if (isset($this->request->get['route']) && $this->request->get['route'] != 'affiliate/tracking') { ?>
<script src="catalog/view/theme/moderns/js/jquery.autocomplete.js" type="text/javascript"></script>
<?php } ?>
<?php if (isset($this->request->get['route']) != 'affiliate/tracking') { ?>
<script src="catalog/view/theme/moderns/js/jquery.autocomplete.js" type="text/javascript"></script>
<?php } ?>
<script type="text/javascript">
$(document).ready(function() {	
	$("#filter_name").autocomplete("getdata.php?lan=<?php echo $_SESSION['language']; ?>", {
		width: 260,
		matchContains: true,
		selectFirst: true
	});
});
</script>
<!--End-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php

// If moderns module is enabled

if($this->config->get('moderns_status')== 1) {

	if($this->config->get('moderns_title_font')!='' || $this->config->get('moderns_body_font')!='' || $this->config->get('moderns_small_font') != '' ) {
		
		$regfonts = array('Arial', 'Verdana', 'Helvetica', 'Lucida Grande', 'Trebuchet MS', 'Times New Roman', 'Tahoma', 'Georgia' );
		
		// Titles font
		if (in_array($this->config->get('moderns_title_font'), $regfonts)==false) { 
			?>
<link href='//fonts.googleapis.com/css?family=<?php echo $this->config->get('moderns_title_font') ?>&v1' rel='stylesheet' type='text/css'>
<?php 
		} // Body font
		if (in_array($this->config->get('moderns_body_font'), $regfonts)==false) { 
			?>
<link href='//fonts.googleapis.com/css?family=<?php echo $this->config->get('moderns_body_font') ?>&v1' rel='stylesheet' type='text/css'>
<?php 
		} // Small text font
		if (in_array($this->config->get('moderns_small_font'), $regfonts)==false) { 
			?>
<link href='//fonts.googleapis.com/css?family=<?php echo $this->config->get('moderns_small_font') ?>&v1' rel='stylesheet' type='text/css'>
<?php 

		} 
	} 
?>
<style type="text/css">
.welcome, h1, .box .box-heading, h2{font-weight:<?php echo $this->config->get('moderns_heading_font_weight') ?>;}
#menu > ul > li > a, #header .links a, #language span, #currency span{font-weight:<?php echo $this->config->get('moderns_menu_font_weight') ?>; text-transform:<?php echo $this->config->get('moderns_menu_font_uppercase') ?>; font-size:<?php echo $this->config->get('moderns_menu_font_size') ?>px;}
<?php  if($this->config->get('moderns_theme_color')!='') {
?>.flex-direction-nav .flex-next:hover, .flex-direction-nav .flex-prev:hover, .nivo-directionNav .nivo-nextNav:hover, .nivo-directionNav .nivo-prevNav:hover, .jcarousel-skin-opencart .jcarousel-next-horizontal:hover, .jcarousel-skin-opencart .jcarousel-next-horizontal:focus, .jcarousel-skin-opencart .jcarousel-prev-horizontal:hover, .jcarousel-skin-opencart .jcarousel-prev-horizontal:focus, .flex-control-paging li a.flex-active, .nivo-controlNav a.active {
 background-color: <?php echo $this->config->get('moderns_theme_color');
?>;
}
.product-grid .wishlist a:hover, .product-grid .compare a:hover, .product-list .wishlist a:hover, .product-list .compare a:hover, a.wishlist:hover, .product-info .review a:hover, .sitemap li a:hover, .login-content .right a:hover, .box-category a:hover, .list-item a:hover, #footer a:hover, #header .links a:hover, .ac_results li strong, #menu > span.active{
color: <?php echo $this->config->get('moderns_theme_color');
?>;
}
 <?php
}
if($this->config->get('moderns_body_text_color')!='') {
?> body {
color: <?php echo $this->config->get('moderns_body_text_color');
?>;
}
 <?php
}
if($this->config->get('moderns_heading_color')!='') {
?> .welcome, h1, .box .box-heading{
color: <?php echo $this->config->get('moderns_heading_color');
?>;
}
<?php
}
if($this->config->get('moderns_heading_h2_color')!='') {
?> h2{
color: <?php echo $this->config->get('moderns_heading_h2_color');
?>;
}

<?php
}
if($this->config->get('moderns_menu_link_color')!='') {
?> #menu > ul > li > a, #language span, #currency span, #header .links a {
color: <?php echo $this->config->get('moderns_menu_link_color');
?>;
}
<?php
}
if($this->config->get('moderns_menu_link_hover_color')!='') {
?> #menu > ul > li:hover > a, #language:hover span, #currency:hover span, #header .links a:hover {
color: <?php echo $this->config->get('moderns_menu_link_hover_color');
?>;
}

 <?php
}
if($this->config->get('moderns_menu_bg_color_hover')!='') {
?> #menu > ul > li:hover > a, #menu > ul > li.categories > div, #menu > ul > li > div, #language ul, #currency ul, #language:hover span, #currency:hover span, #menu > ul > li.categories > div > .column > div, #menu > ul > li.categories_hor > div {
background-color: <?php echo $this->config->get('moderns_menu_bg_color_hover');
?>;
} 
 
 <?php
}
if($this->config->get('moderns_sub_menu_color')!='') {
?> #menu > ul > li.categories > div > .column a, #menu > ul > li > div > ul li a, #menu > ul > li > div, #menu > ul > li div > ul > li > a, #menu > ul > li.categories_hor > div > .column > a {
color: <?php echo $this->config->get('moderns_sub_menu_color');
?>;
}
 <?php
}
if($this->config->get('moderns_sub_menu_hover_color')!='') {
?> #menu > ul > li.categories > div > .column:hover > a, #menu > ul > li div > ul li > a:hover, #menu > ul > li.categories > div > .column > div > ul > li:hover > a, #language ul li a:hover, #currency ul li a:hover, #currency a b, #menu > ul > li.categories_hor > div > .column:hover > a {
color: <?php echo $this->config->get('moderns_sub_menu_hover_color');
?>;
}
 <?php
}
if($this->config->get('moderns_price_color')!='') {
?> .box-product .price, .product-info .price, .product-grid .price, .slider_pprice {
color: <?php echo $this->config->get('moderns_price_color');
?>;
}
 <?php
}
if($this->config->get('moderns_old_price_color')!='') {
?> .box-product .price-old, .product-info .price-old, .product-grid .price-old {
color: <?php echo $this->config->get('moderns_old_price_color');
?>;
}
 <?php
}
if($this->config->get('moderns_new_price_color')!='') {
?> .box-product .price-new, .product-grid .price-new {
color: <?php echo $this->config->get('moderns_new_price_color');
?>;
}
 <?php
}
if($this->config->get('moderns_tax_price_color')!='') {
?> .product-info .price-tax, .product-grid .price .price-tax {
color: <?php echo $this->config->get('moderns_tax_price_color');
?>;
}
 <?php
}
if($this->config->get('moderns_button_bg_color')!='') {
?> a.button, input.button{
border-color: <?php echo $this->config->get('moderns_button_bg_color');
?>;
}
<?php
}
if($this->config->get('moderns_button_text_color')!='') {
?> a.button, input.button{
color: <?php echo $this->config->get('moderns_button_text_color');
?>;
}
 <?php
}
if($this->config->get('moderns_button_bg_hover_color')!='') {
?> a.button:hover, input.button:hover {
background-color: <?php echo $this->config->get('moderns_button_bg_hover_color');
?>;
}
<?php
}
if($this->config->get('moderns_button_bg_hover_color')!='') {
?> a.button:hover, input.button:hover {
border-color: <?php echo $this->config->get('moderns_button_bg_hover_color');
?>;
}
<?php
}
if($this->config->get('moderns_button_text_hover_color')!='') {
?> a.button:hover, input.button:hover{
color: <?php echo $this->config->get('moderns_button_text_hover_color');
?>;
}
<?php
}
if($this->config->get('moderns_product_button_bg_color')!='') {
?> .product-grid .cart input, .product-list .cart input, .box-product > .flexslider ul li .cart input, .box-product > .flexslider ul li .cart a{
border-color: <?php echo $this->config->get('moderns_product_button_bg_color');
?>;
}
 <?php
}
if($this->config->get('moderns_product_button_text_color')!='') {
?> .product-grid .cart input, .product-list .cart input, .box-product > .flexslider ul li .cart input, .box-product > .flexslider ul li .cart a{
color: <?php echo $this->config->get('moderns_product_button_text_color');
?>;
}
 <?php
}
if($this->config->get('moderns_product_button_bg_hover_color')!='') {
?> .product-grid .cart input:hover, .product-list .cart input:hover, .box-product > .flexslider ul li .cart input:hover, .box-product > .flexslider ul li .cart a:hover{
background-color: <?php echo $this->config->get('moderns_product_button_bg_hover_color');
?>;
}
<?php
}
if($this->config->get('moderns_button_bg_hover_color')!='') {
?> .product-grid .cart input:hover, .product-list .cart input:hover, .box-product > .flexslider ul li .cart input:hover, .box-product > .flexslider ul li .cart a:hover{
border-color: <?php echo $this->config->get('moderns_product_button_bg_hover_color');
?>;
}

 <?php
}
if($this->config->get('moderns_product_button_text_hover_color')!='') {
?> .product-grid .cart input:hover, .product-list .cart input:hover, .box-product > .flexslider ul li .cart input:hover, .box-product > .flexslider ul li .cart a:hover{
color: <?php echo $this->config->get('moderns_product_button_text_hover_color');
?>;
}
 <?php
}
if ($this->config->get('moderns_body_font') != '' ) {
 $fontpre = $this->config->get('moderns_body_font');
 $font = str_replace("+", " ", $fontpre);
 ?>  body, p {
font-family:<?php echo $font ?>;
}
 <?php
}
 if($this->config->get('moderns_title_font')!='') {
 $fontpre = $this->config->get('moderns_title_font');
 $font = str_replace("+", " ", $fontpre);
 ?>  .welcome, h1, h2, h3, .box .box-heading, .checkout-heading, .manufacturer-heading, .product-tab .tabs li a {
 font-family:<?php echo $font ?>;
}
 <?php
}
 if($this->config->get('moderns_main_menu_font')!='') {
 $fontpre = $this->config->get('moderns_main_menu_font');
 $font = str_replace("+", " ", $fontpre);
 ?>  #menu > ul > li > a, #language span, #currency span, #header .links a {
 font-family:<?php echo $font ?>;
}
 <?php
}
 if ($this->config->get('moderns_custom_css') != '') {
 echo htmlspecialchars_decode($this->config->get('moderns_custom_css'));
}
?>
</style>
<?php } ?>
<?php if ($stores) { ?>
<script type="text/javascript"><!--
$(document).ready(function() {
<?php foreach ($stores as $store) { ?>
$('body').prepend('<iframe src="<?php echo $store; ?>" style="display: none;"></iframe>');
<?php } ?>
});
//--></script>
<?php } ?>
<?php echo $google_analytics; ?>
</head>
<?php if($_SERVER['QUERY_STRING'] == "" || $_SERVER['QUERY_STRING'] == "route=common/home"){ $cls="home";}else{ $cls="";}?>
<body class="<?php echo $cls; ?> <?php if($this->config->get('moderns_full_slideshow')== 1) { ?>fmobile<?php } ?>">

<div class="header-wrapper">
<div id="header">
<?php if ($logo) { ?>
  <div id="logo" style="margin-top:<?php echo $this->config->get('moderns_logo_top_margin'); ?>px;"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
  <?php } ?>
<?php $lang = (int)$this->config->get('config_language_id'); ?>
<div id="menu" class="m-menu">
  <span>菜单</span>
    <ul>
    <?php if($this->config->get('moderns_home_link')== 2) { ?>
      <li><a title="<?php echo $text_home; ?>" href="<?php echo $home; ?>"><span><?php echo $text_home; ?></span></a></li>
      <?php } ?>
      <?php if ($categories) { ?>
      <li class="<?php if($this->config->get('moderns_top_menu')== 2) { ?>categories<?php } ?><?php if($this->config->get('moderns_top_menu')== 3) { ?>categories_hor<?php } ?>"><a><?php echo $heading_title; ?></a>
        <div>
          <?php foreach ($categories as $category) { ?>
          <div class="column"> <a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
            <?php if ($category['children']) { ?>
            <div>
              <?php for ($i = 0; $i < count($category['children']);) { ?>
              <ul>
                <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
                <?php for (; $i < $j; $i++) { ?>
                <?php if (isset($category['children'][$i])) { ?>
                <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
                <?php } ?>
                <?php } ?>
              </ul>
              <?php } ?>
            </div>
            <?php } ?>
          </div>
          <?php } ?>
        </div>
      </li>
      <?php } ?>
    <?php 
    $moderns_custom_link1 = $this->config->get('moderns_custom_link1');
    $moderns_custom_link1_url = $this->config->get('moderns_custom_link1_url');
    $moderns_custom_link1_title = $this->config->get('moderns_custom_link1_title');
    $moderns_target_link1 = $this->config->get('moderns_target_link1');
    
    if(isset($moderns_custom_link1[$lang]) && $moderns_custom_link1[$lang]== 1) { ?>  
    <li><a <?php if(isset($moderns_target_link1[$lang]) && $moderns_target_link1[$lang]== 1) { ?>target="_blank"<?php } ?> href="<?php echo $moderns_custom_link1_url[$lang]; ?>"><?php echo $moderns_custom_link1_title[$lang]; ?></a></li>
    <?php } ?>
    
    <?php 
    $moderns_custom_link2 = $this->config->get('moderns_custom_link2');
    $moderns_custom_link2_url = $this->config->get('moderns_custom_link2_url');
    $moderns_custom_link2_title = $this->config->get('moderns_custom_link2_title');
    $moderns_target_link2 = $this->config->get('moderns_target_link2');
    
    if(isset($moderns_custom_link2[$lang]) && $moderns_custom_link2[$lang]== 1) { ?>  
    <li><a <?php if(isset($moderns_target_link2[$lang]) && $moderns_target_link2[$lang]== 1) { ?>target="_blank"<?php } ?> href="<?php echo $moderns_custom_link2_url[$lang]; ?>"><?php echo $moderns_custom_link2_title[$lang]; ?></a></li>
    <?php } ?>
    
    <?php 
    $moderns_custom_link3 = $this->config->get('moderns_custom_link3');
    $moderns_custom_link3_url = $this->config->get('moderns_custom_link3_url');
    $moderns_custom_link3_title = $this->config->get('moderns_custom_link3_title');
    $moderns_target_link3 = $this->config->get('moderns_target_link3');
    
    if(isset($moderns_custom_link3[$lang]) && $moderns_custom_link3[$lang]== 1) { ?>  
    <li><a <?php if(isset($moderns_target_link3[$lang]) && $moderns_target_link3[$lang]== 1) { ?>target="_blank"<?php } ?> href="<?php echo $moderns_custom_link3_url[$lang]; ?>"><?php echo $moderns_custom_link3_title[$lang]; ?></a></li>
    <?php } ?>
    
    <?php 
    $moderns_custom_block_status = $this->config->get('moderns_custom_block_status');
    $moderns_custom_block_title = $this->config->get('moderns_custom_block_title');
    $moderns_custom_block_content = $this->config->get('moderns_custom_block_content');    
    
    if(isset($moderns_custom_block_status[$lang]) && $moderns_custom_block_status[$lang]== 1) { ?>
    <li class="wrap_custom_block"><a href=""><?php echo $moderns_custom_block_title[$lang]; ?></a>
      <div class="custom_block">
        <ul>
          <li><?php echo html_entity_decode($moderns_custom_block_content[$lang], ENT_QUOTES, 'UTF-8'); ?></li>
        </ul>
      </div>
    </li>
    <?php } ?>
    
      <?php if($this->config->get('moderns_my_account')== 1) { ?>
      <li><a><?php echo $text_account; ?></a>
        <div>
          <ul>
            <li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
            <li><a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a></li>
            <li><a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></li>
            <li><a href="<?php echo $order; ?>"><?php echo $text_order; ?></a></li>
            <li><a href="<?php echo $newsletter; ?>"><?php echo $text_newsletter; ?></a></li>
          </ul>
        </div>
      </li>
      <?php } ?>
    </ul>
  </div>
  <?php echo $language; ?>
  <?php echo $currency; ?>
  <?php echo $cart; ?>
  <div id="qq">
     <div class="heading">
     <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1939519635&site=qq&menu=yes" title="在线客服"></a>
	 </div>
  </div>
  <div id="search">
    <div class="button-click"></div>
    <div class="button-search"></div>
    <input type="text" name="search" id="filter_name" placeholder="<?php echo $text_search; ?>" value="<?php echo $search; ?>" />
  </div>
  <div class="links">
    <?php if (!$logged) { ?>
    <?php echo $text_welcome; ?>
    <?php } else { ?>
    <?php echo $text_logged; ?>
    <?php } ?>
    </div>
</div>
</div>
<div class="main-wrapper <?php if($this->config->get('moderns_full_slideshow')== 1) { ?>full-slideshow<?php } ?>">
<div id="container">
<div id="notification"></div>